//
//  IssueView.h
//  Dispatch
//
//  Created by hyeyeon on 14. 1. 14..
//  Copyright (c) 2014년 hyeyeon. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ListCell.h"
#import "ViewController.h"
#import "PhotoViewController.h"
#import "NetworkErrorView.h"

#import "EGORefreshTableHeaderView.h"

@class AppDelegate;
@interface IssueView : UIView <UITableViewDataSource, UITableViewDelegate,UIScrollViewDelegate, EGORefreshTableHeaderDelegate, NetworkErrorViewDelegate>
{
    AppDelegate *appDelegate;
    CGRect mRect;
    
    UITableView *mTableView;
    UIButton *topMoveButton;
    
    //네트워크에서 받은 데이터
    BOOL isEnd;    //다음페이지 있는지 확인
    
    //네트워크 받는중
    BOOL duringNetwork;
    
    //sdk관련
    BOOL scrollDecelerate;
    
    //현재 부르고있는 페이지번호
    float currentOffsetY;
    
    //스크롤잡을라고
	EGORefreshTableHeaderView *_refreshHeaderView;
	BOOL _reloading;
    
    UIView *activieiBGView;
    UIActivityIndicatorView *activityView;
    
}
//테이블
@property (nonatomic,retain) UITableView *mTableView;

@property NSInteger currentHeadIndex;   //핫이슈 넘버
@property NSInteger currentPage;  //현재 페이지넘버

//네트워크에서 받은 데이터
@property (nonatomic, strong) NSMutableData *responseData;
@property (nonatomic, retain) NSMutableArray *itemHeadArray;
@property (nonatomic, retain) NSMutableArray *itemArray;
@property (nonatomic, retain) NSString *imageURL;

@property BOOL finishLoad;


-(void)requestIssueListWithPageNumber:(NSInteger)pageNumber;    //페이지번호 받아 이슈리스트 부르기
-(void)loadNextPage;    //다음페이지 이슈리스트를 부르기

-(void)appearPhotoViewControllerWithID:(NSString*)issueID;   //스키마에서 부를때 쓰자
-(void)appearPhotoViewControllerWithID:(NSString*)issueID andPushID:(NSString*)pushID;
@end
